import java.util.Arrays;

public class Text7 {
        public static void main(String[] args) {

            int[] arr={3,2,3,4,4,4,4};
            //int[] arr={2,2,1,1,1,2,2};
            int ret = fun(arr);
            if(ret != -1){
                System.out.println(arr[ret]);
            }else{
                System.out.println("wy=");
            }

        }

        /*public static int fun(int[] arr){
            for (int i = 0; i < arr.length; i++) {
                int count = 0;
                for (int j = 0; j<arr.length; j++) {
                    if(arr[i]==arr[j]){
                        count++;
                    }
                }
                if(count > arr.length / 2){
                    return i;
                }
            }
            return -1;
        }*/
    public static int fun(int[] arr){
        Arrays.sort(arr);
        return arr[arr.length/2];
    }
    }

